gridpack::math::LinearSolverT< T, I > Class Template Reference

A solver for system(s) of linear equations in parallel. More...

#include <linear_solver.hpp>

Inheritance diagram for gridpack::math::LinearSolverT< T, I >:
Inheritance graph
[legend]
Collaboration diagram for gridpack::math::LinearSolverT< T, I >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
BaseLinearSolverInterface< T,
I >::MatrixType 
MatrixType
typedef
BaseLinearSolverInterface< T,
I >::VectorType 
VectorType

Public Member Functions

 LinearSolverT (MatrixType &A)
 Default constructor.
 ~LinearSolverT (void)
 Destructor.

Detailed Description

template<typename T, typename I = int>
class gridpack::math::LinearSolverT< T, I >

A solver for system(s) of linear equations in parallel.

A LinearSolver is used to solve a system of linear equations:

\[ \left[ \mathbf{A} \right] \mathbf{x} ~ = ~ \mathbf{b} \]

where $\left[ \mathbf{A} \right]$ is the coefficient matrix, and $\mathbf{x}$ and $\mathbf{b}$ are vectors.

A LinearSolver is instantiated using an existing coefficient Matrix. It must be intantiated simutaneously on all processes involved in the communicator used by the coefficent Matrix. It similarly must be destroyed simultaneously on all processes.

A particular system is solved using the solve() method, which requires the $\mathbf{b}$ Vector and a Vector that serves as the intial estimate of $\mathbf{x}$. Multiple systems can be solved using the same coefficient matrix by repeatedly calling solve() with different $\mathbf{b}$ and $\mathbf{x}$ vectors. If the coefficient matrix changes in any way (even just the coefficients) between system solutions, the setMatrix() method must be called before solve();

This class encapuslates the linear system solver of the underlying math library. The Pimpl idiom is used for implementation, so user code is completely independent of the underlying library. This class simply provides an interface to a specific implementation.


Member Typedef Documentation

template<typename T , typename I = int>
typedef BaseLinearSolverInterface<T, I>::MatrixType gridpack::math::LinearSolverT< T, I >::MatrixType
template<typename T , typename I = int>
typedef BaseLinearSolverInterface<T, I>::VectorType gridpack::math::LinearSolverT< T, I >::VectorType

Constructor & Destructor Documentation

template<typename T , typename I = int>
gridpack::math::LinearSolverT< T, I >::LinearSolverT ( MatrixType A  ) 

Default constructor.

Collective

This will create a LinearSolver instance on the same communicator used by the coefficient Matrix A. All processes in the communicator must call this simultaneously.

The Matrix A must exist for the life of this instance.

Parameters:
A existing, filled coefficient matrix
Returns:
new LinearSolver instance
template<typename T , typename I = int>
gridpack::math::LinearSolverT< T, I >::~LinearSolverT ( void   ) 

Destructor.

Collective

This destroys a LinearSolver. It must be called simutaneously by all processes involved in calling the constructor.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1